package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalTime;

/**
 * 充电计费时段
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_car_park_charge_time")
public class CarParkChargeTime extends Model<CarParkChargeTime> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "tid", type = IdType.ASSIGN_ID)
    private String tid;
    /**
     * 原价
     */
    @TableField("original_price")
    private BigDecimal originalPrice;
    /**
     * 优惠价
     */
    @TableField("concessional_rate")
    private BigDecimal concessionalRate;
    /**
     * 服务费
     */
    @TableField("service_charge")
    private BigDecimal serviceCharge;
    /**
     * 电费
     */
    @TableField("electricity_fees")
    private BigDecimal electricityFees;
    /**
     * 开始时间
     */
    @TableField("start_time")
    private LocalTime startTime;
    /**
     * 结束时间
     */
    @TableField("end_time")
    private LocalTime endTime;
    /**
     * 停车场标识
     */
    @TableField("p_id")
    private String pId;

    public void freeData() {
        this.tid = null;
        this.originalPrice = null;
        this.concessionalRate = null;
        this.serviceCharge = null;
        this.startTime = null;
        this.endTime = null;
        this.pId = null;
    }

}
